{foreach $lists as $v}
<tr cate-id="{$v['id']}" fid="{$v['pid']}" >
  <td>
    <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id="{$v['id']}"><i class="layui-icon">&#xe605;</i></div>
  </td>
  <td>{$v['id']}</td>
  <td>
    {if(checkAction('Classtype/editClassOrders'))}
    <input type="text" class="layui-input x-sort"  name="order" value="{$v['orders']}">
    {else}
    {$v['orders']}
    {/if}
  </td>

  <td>
    {fun str_repeat('&nbsp;&nbsp;&nbsp;',$v['level'])}
    {if($classtypedata[$v['id']]['haschild'])}
    <i class="layui-icon x-show" onclick="getchildren({$v['id']},this)" status="true">&#xe623;</i>
    {else}
    {if($v['level'])}|——{/if}
    {/if}
    {$v['classname']}
  </td>
  <td>{$moldslist[$v['molds']]['name']}</td>
  {if($admin['classcontrol']==0 ||$admin['isadmin'] || strpos($tids,','.$v['id'].',')!==false)}
  <td class="td-status" >
    {if($v['isclose']==0)}
    {if(checkAction('Classtype/change_status'))}
    <input type="checkbox" value="{$v['id']}" name="switch" lay-filter="status"   lay-text="{fun JZLANG('显示|隐藏')}"  lay-skin="switch" {if($v['isshow']==1)}checked{/if}>
    {else}
    {if($v['isshow']==1)}
    <span class="layui-badge layui-bg-green">{fun JZLANG('显示')}</span>
    {else}
    <span class="layui-badge">{fun JZLANG('隐藏')}</span>
    {/if}
    {/if}
    {else}
    已关闭
    {/if}
  </td>

  <td class="td-manage">
    {if(checkAction('Classtype/addclass'))}
    <a  class="layui-btn layui-btn-warm layui-btn-xs"  onclick="x_admin_show('{fun JZLANG('添加下级')}','{fun U('Classtype/addclass',array('pid'=>$v['id'],'biaoshi'=>$v['molds']))}')" >{fun JZLANG('添加下级')}</a>
    {/if}
    {if(checkAction('Fields/index'))}
    <a class="layui-btn layui-btn-normal layui-btn-xs"  onclick="x_admin_show('{fun JZLANG('字段管理')}','{fun U('Fields/index',array('molds'=>$v['molds']))}')" >{fun JZLANG('字段管理')}</a>
    {/if}

    {if($v['molds']=='article')}
    {if(checkAction('Article/addarticle'))}
    <a  class="layui-btn  layui-btn-xs"  onclick="x_admin_show('{fun JZLANG('新增文章')}','{fun U('Article/addarticle',['tid'=>$v['id']])}')" >{fun JZLANG('新增文章')}</a>
    {/if}
    {else if($v['molds']=='product')}
    {if(checkAction('Product/addproduct'))}
    <a  class="layui-btn  layui-btn-xs"  onclick="x_admin_show('{fun JZLANG('新增商品')}','{fun U('Product/addproduct',['tid'=>$v['id']])}')" >{fun JZLANG('新增商品')}</a>
    {/if}
    {else}
    {if($v['molds']!='message' && $v['molds']!='page')}
    {if(checkAction('Extmolds/addmolds/molds/'.$v['molds']))}
    <a  class="layui-btn  layui-btn-xs"  onclick="x_admin_show('{fun JZLANG('新增内容')}','{fun U('Extmolds/addmolds',array('molds'=>$v['molds'],'tid'=>$v['id']))}')" >{fun JZLANG('新增内容')}</a>
    {/if}
    {/if}
    {/if}

  </td>
  <td class="td-manage">
    {if(checkAction('Classtype/editclass'))}
    <a class="layui-btn layui-btn layui-btn-xs"  onclick="x_admin_show('{fun JZLANG('编辑')}','{fun U('Classtype/editclass',array('id'=>$v['id']))}')" >{fun JZLANG('编辑')}</a>
    {/if}

    <a href="{$classtypedata[$v['id']]['url']}" class="layui-btn layui-btn-normal layui-btn layui-btn-xs"  target="_blank">{fun JZLANG('预览')}</a>
    {if(checkAction('Classtype/deleteclass'))}
    <a class="layui-btn-danger layui-btn layui-btn-xs"  onclick="member_del(this,'{$v['id']}')" href="javascript:;" >{fun JZLANG('删除')}</a>
    {/if}
  </td>
  {else}
  <td class="td-status" >
    {if($v['isshow']==1)}
    <span class="layui-badge layui-bg-green">{fun JZLANG('显示')}</span>
    {else}
    <span class="layui-badge">{fun JZLANG('隐藏')}</span>
    {/if}
  </td>
  <td class="td-manage">-</td>
  <td class="td-manage">-</td>


  {/if}

</tr>
{/foreach}